﻿#define _CRT_SECURE_NO_WARNINGS 1

//编程初学者入门训练第三十五题
//BC37 网购
//https://www.nowcoder.com/practice/5d7dfd405e5f4e4fbfdff6862c46b751?tpId=107&tqId=33318&rp=1&ru=/exam/oj/ta&qru=/exam/oj/ta&sourceUrl=%2Fexam%2Foj%2Fta%3FtpId%3D107&difficulty=undefined&judgeStatus=undefined&tags=&title=

#include <stdio.h>

int main() {
    float price = 0.0f;
    int month = 0;
    int day = 0;
    int Coupons = 0;
    scanf("%f %d %d %d", &price, &month, &day, &Coupons);

    float result = price;
    //双十一或者双十二
    if (month == 11 && day == 11) {
        result *= 0.7;
    }
    else if (month == 12 && day == 12) {
        result *= 0.8;
    }
    //优惠券
    if (Coupons) {
        result -= 50;
        if (result > 0)
        {
            printf("%.2f", result);
        }
        else
            printf("0.00");
    }
    else {
        printf("%.2f", result);
    }

    return 0;
}